TEXTURE ATLASES FOR BEGINNERS
First of all, the Texture Atlas, as far as I know, is a texture file that is made of of all the common textures used in the mod. If your just adding a single texture then you may not want to bother with updating the texture Atlas. Using the Atlas will help optimize the game when you have multiple things that are added to the game that can share texture sets. For all examples I am going to reference the way PR does it as it is the PR Forums ; ) The first thing you would want to do is create an additional Texture atlas. Say you have the atlas's MemeAtlas_030.dds MemeAtlas_031.dds MemeAtlas_032.dds already created, start making a texture in photoshop called MemeAtlas_033.dds. If you have none already just start out with MemeAtlas_30.dds. From what I understand you've already done this so just make sure all the images are compressed together but not so much so that there will be overlap. Once you are done save the image as above (MemeAtlas_03.dds)and extract to the folder mod/menu/menu_client.zip\Atlas Now the tough part . Navigate to the folder: mod/menu/menu_server.zip\Atlas You should have a file called AtlasList.con with this code in it: Code: hudManager.addTextureAtlas "PR_MemeAtlas.tai" hudManager.addTextureAtlas "MemeAtlas.tai" note the PR_MemeAtlas.tai might be named something different depending on what mod you're from. If the file or those lines aren't there write them yourself Next Open PR_MemeAtlas.tac (or whatever its called for you as long as it is a .tac file) in the same directory: If for these icons you are replacing older files ensure that all your files are listed in here using search (control + f) and if they are in the file you are fine with this file. If not then add the appropriate lines at the bottom of the list with this basic template: border eg: Code: Menu\HUD\Texture\Ingame\Vehicles\Icons\Hud\VehicleIcons\t62.tga border No idea why this is actually necessary but just do it lol Once all your files are included in here the next thing you worry about is to make sure none of your files are in the exclude list which is MemeAtlasExclude.lst (which is in the same directory we have been in) if none are in this list, you are fine; if they are in the list remove them. Finally the tough part which is editing the .tai file Open up PR_MemeAtlas.tai in the same directory or whatever your .tai file is listed as. Here is the very basic explanation of how the file works from the file itself: ---------------------------------------------------------------------------------------- menu\Atlas\PR_MemeAtlas.tai , , , , , Texture can be found in texture atlas , i.e., .dds with texture coordinates boundary given by: A = ( , ) B = ( + , + ) where coordinates (0,0) and (1,1) of the original texture map correspond to coordinates A and B, respectively, in the texture atlas. ---------------------------------------------------------------------------------------- So basically in English what you are going to be doing is adding a line for each new image you want ingame. I will make the following line as an example of one of the textures from the actual HUD/Selection folder which is almost identical to what you need to do: The final product will look like this: Code: Menu/HUD/Texture/Ingame/Weapons/Icons/Hud/Selection/Ataka_missile.tga Menu\Atlas\MemeAtlas_032.dds, 2, 0.0761719, 0.766602, 0.0732422, 0.0219727 So your code is going to look like this: Menu/HUD/Texture/Ingame/Weapons/Icons/Hud/Selection_alt/my_weapon.tga Menu\Atlas\MemeAtlas_033.dds, 3, <width pixel of icon/width of map>, <height pixel of icon/height of map>, <of icon/width of map>, <of icon/height of map> Now your going to have to find the 4 numbers at the end manually. The first thing you want to do is record the height and width of your image using the image/image size in photoshop. For this example the image is 2048 width and height. Now you need to record the starting and ending pixels of both the height and width of the image. To do this go to the ruler tool. When you click on a given pixel it will list the pixels height and width. By clicking the upper left corner of the icon you will get the starting height and width and then by dragging the other end to the bottom right corner you will get the height and width. Note: round to the pixel here and be sure you have the right pixels. Use the standard bf2 textures as templates. For the example the values (you can see them in the upper left corner of the example image) are: Starting Width: 156 Starting Height: 1570 Width of icon: 150 Height of icon: 45 Next by doing some math you can find the four numbers in the file which are simply the numbers above divided by the total width and height rounded to 6-7 decimals (make sure you round the last decimal right :P). Starting Width: 156/2048 = .0761719 Starting Height: 1570/2048 = .766602 Width of icon: 150/2048 = .0732422 Height of icon: 45/2048 = .0219727 Finally take those 4 numbers and list them in order at the end of the line which once again looks like this: Code: Menu/HUD/Texture/Ingame/Weapons/Icons/Hud/Selection/Ataka_missile.tga Menu\Atlas\MemeAtlas_032.dds, 2, 0.0761719, 0.766602, 0.0732422, 0.0219727 Also note here that if the icons in question are already listed in the .tai file you need to replace the old values not create new ones but if they aren't just add these at the bottom of the list.